Skip to content

Documentation #8646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed

Conversation

Ranausama420
Copy link

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Apr 12, 2023
@Ranausama420
Copy link
Author

add documentation

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Apr 12, 2023
@tianyizheng02
Copy link
Contributor

How is this PR different from #8633?

@ChrisO345
Copy link
Collaborator

In order to merge a PR, all test must pass, can you try to fix these errors.

Copy link
Contributor

@CaedenPH CaedenPH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not add any information that the person reading the code cannot infer themselves - Seems pointless

if i not in temp:
temp.append(i)
## changed below lines added sets functionality and remove for loops to get unique elemnt in list
temp = list(set(key))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a documentation change

Comment on lines +3 to +7
"""This function takes two parameters: a string variable named
'key' (with a default value of 'college') and a string variable
named 'pt' (with a default value of 'UNIVERSITY').
The function returns a string that is a transformation of the 'pt' argument
based on a key-shift cipher"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, this isn't inside of a function and isn't formatted
Secondly, what does this tell the user that we don't already know? Everything you said is clearly shown by typehints and naming conventions

Comment on lines +46 to +47
print(r)
print(len_temp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these prints

Suggested change
print(r)
print(len_temp)

Comment on lines +48 to +51
# for i in range(r*len_temp):
# s = [temp[i] for _ in range(len_temp) if i < 26]
# modalpha.append(s)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# for i in range(r*len_temp):
# s = [temp[i] for _ in range(len_temp) if i < 26]
# modalpha.append(s)

Along with this random temp code

Comment on lines +53 to +56
"""These lines of code creates a dictionary by iterating over the list of
lists. Each letter in the alphabets list is mapped to a letter in a row of
the "modalpha" list. The mappings are stored in the dictionary with the
indices of the alphabets list as keys and the values fromthe corresponding modalpha lists as values"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be in the forms of comments, not docstrings

@tianyizheng02
Copy link
Contributor

@CaedenPH this PR is basically identical to an earlier PR #8633 (same commits as this one), so one of the two should be closed. We can probably keep this PR since you already started a review on this one.

There's also an even earlier PR #8626 by a different author that fixes the same issue #8622, so it'd be good if you could take a look at that one as well.

Copy link
Contributor

@tianyizheng02 tianyizheng02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.

Please make separate PRs for your changes to mixed_keyword_cypher.py and your changes to the other files

@tianyizheng02 tianyizheng02 added the duplicate This is a duplicate PR from the same user label Jul 31, 2023
@tianyizheng02
Copy link
Contributor

Closed as duplicate of #8633

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed duplicate This is a duplicate PR from the same user enhancement This PR modified some existing files tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants